package com.xiaoxu.content.controller;

import com.xiaoxu.content.model.dto.CourseCategoryTreeDto;
import com.xiaoxu.content.service.CourseCategoryService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author xiaoxu
 * @version 1.0
 * @description 课程分类信息接口
 * @date 2023/1/15 21:49
 */
@RestController
public class CourseCategoryController {
    private final CourseCategoryService courseCategoryService;

    public CourseCategoryController(CourseCategoryService courseCategoryService) {
        this.courseCategoryService = courseCategoryService;
    }

    @GetMapping("/course-category/tree-nodes")
    public List<CourseCategoryTreeDto> queryTreeNodes() {
        return courseCategoryService.queryTreeNodes("1");
    }
}
